package com.lyy.yygh.statistics.controller;

import com.lyy.order.client.OrderFeignClient;
import com.lyy.yygh.common.result.Result;
import com.lyy.yygh.vo.order.OrderCountQueryVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Api(tags = "统计管理接口")
@RestController
@RequestMapping("/admin/statistics")
public class StatisticsController {

    @Autowired
    private OrderFeignClient orderFeignClient;

    @ApiOperation(value = "获取订单统计数据")
    @GetMapping("getCountMap")
    public Result getCountMap(OrderCountQueryVo orderCountQueryVo) {
        System.out.println("orderCountQueryVo是"+orderCountQueryVo);
        return Result.ok(orderFeignClient.getCountMap(orderCountQueryVo));
    }

    @GetMapping("getHosnameMap")
    public Result getHosnameMap(){
        System.out.println("前端要查询科室统计信息");
        return Result.ok(orderFeignClient.getHosnameMap());

    }
}
